package com.xxgc.eow.service.impl;

import com.xxgc.eow.entity.Choosecontent;
import com.xxgc.eow.mapper.ChoosecontentMapper;
import com.xxgc.eow.service.IChoosecontentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 选择题选项 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-18
 */
@Service
public class ChoosecontentServiceImpl extends ServiceImpl<ChoosecontentMapper, Choosecontent> implements IChoosecontentService {

    @Resource
    private ChoosecontentMapper choosecontentMapper;

    @Override
    public int updateChoosecontentByTopicId(Choosecontent choosecontent,Integer index) {
        return choosecontentMapper.updateByTopicId(choosecontent,index);
    }

    @Override
    public int addChoosecontent(Choosecontent choosecontent) {
        return choosecontentMapper.insert(choosecontent);
    }
}
